package cn.itcast.core.service;

import cn.itcast.core.pojo.Dept;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @auther :hyh
 * @desc :
 * @date :2019/5/11
 */
@FeignClient(value = "microservicecloud-dept",fallback = abc.class)
public interface DeptClientService {

    @GetMapping("/dept/list")
    public List<Dept> list();


    @GetMapping("/dept/get/{id}")
    public Dept get(@PathVariable("id") Long id);

    @PostMapping("/dept/add")
     boolean add(@RequestBody Dept dept);
}
